package com.springboot.util.base;

import com.springboot.ding.monitor.MonitorUtil;
import com.springboot.util.config.MyProperties;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @description:
 * @author: zyj
 * @create: 2020-11-11 13:32
 **/
@Component
public class MonitorBase {
    @Autowired
    private MyProperties myProperties;

    public void errorMonitor(Exception e, String message, Logger logger){
        MonitorUtil.sendMessageTextStr(e, message, logger, myProperties.isSendDing(), myProperties.isSendCat());
    }
}
